Hydrocarbons found underground are typically present in rock formations. These rock formations are usually porous to some respect and can be classified as porous media. Hydrocarbon extraction from this porous media is often performed using a fluid (e.g., water) immiscible with the hydrocarbon. To understand hydrocarbon extraction from a porous media, simulations are used to characterize the porous media and the flow through the porous media.